<template>
	<!-- 现货订单 新建 -->
	<div class="mainContent sportnew">
		<div class="bread-nav">
			<span class="bread-item">仓储管理</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item">调拨管理</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item activeNavs" @click="back">物料调拨入库</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item">新建</span>
		</div>
		<div class="container">
			<el-row>
				<div class="common-table-title">
					<div class="common-table-icon"></div>
					<div class="common-table-fl">确定申请来源</div>
				</div>
				<!--  -->
				<el-row class="rows basic">
					<el-col :sm="12" :md="8" :lg="6">
						<div class="items">
							<label class="label" for="">
								<img class="required" src="@/assets/img/flower_red.png" alt="">
								发货仓库
							</label>
							<el-select v-model="Model.formInline.region" placeholder="活动区域">
								<el-option label="一" value="shanghai"></el-option>
								<el-option label="二" value="beijing"></el-option>
							</el-select>
						</div>
					</el-col>
				</el-row>
				<el-row class="rows basic">
					<el-col :sm="12" :md="8" :lg="6">
						<div class="items">
							<label class="label" for="">
								<img class="required" src="@/assets/img/flower_red.png" alt="">
								收货仓库
							</label>
							<el-select v-model="Model.formInline.region" placeholder="活动区域">
								<el-option label="一" value="shanghai"></el-option>
								<el-option label="二" value="beijing"></el-option>
							</el-select>
						</div>
					</el-col>
				</el-row>
				<el-row class="rows basic">
					<el-col :sm="24" :md="16" :lg="12">
						<div class="items">
							<label class="label" for="">
								<img class="required" src="@/assets/img/flower_red.png" alt="">
								申请原因：
							</label>
							<el-input type="textarea" v-model="Model.params.loveDeclaration"></el-input>
						</div>
					</el-col>
				</el-row>
				<el-row class="rows basic">
					<el-col :sm="24" :md="16" :lg="12">
						<div class="items">
							<label class="label" for="">
								<img class="required" src="@/assets/img/flower_red.png" alt="">
								申请时间：
							</label>
							<el-date-picker v-model="Model.params.time" type="date" placeholder="选择日期">
							</el-date-picker>
						</div>
					</el-col>
				</el-row>
				<el-row class="rows basic">
					<el-col :sm="24" :md="16" :lg="12">
						<div class="items">
							<label class="label" for="">
								备注：
							</label>
							<el-input type="textarea" v-model="Model.params.loveDeclaration"></el-input>
						</div>
					</el-col>
				</el-row>
			</el-row>
			<!-- ********************************************************************** -->
			<div class="common-table-title" style="margin-top: 16px;">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">添加需求商品</div>
				<div class="common-btn-group">
					
				</div>
			</div>
			<div class="exports">
				<el-row>
					<el-form :inline="true" :model="Model.formInline" class="demo-form-inline">
						<div>
							<el-form-item label="是否手动导入">
								<el-radio-group v-model="Model.formInline.manualImport">
									<el-radio :label="true">是</el-radio>
									<el-radio :label="false">否</el-radio>
								</el-radio-group>
							</el-form-item>
							<el-form-item v-if="Model.formInline.manualImport">
								<el-button type="primary">导入物料</el-button>
							</el-form-item>
						</div>
						<div v-if="!Model.formInline.manualImport">
							<el-form-item label="">
								<el-input v-model="Model.formInline.user" placeholder="请扫码入库/输入SKU"></el-input>
							</el-form-item>
							<el-form-item>
								<el-button type="primary">确定</el-button>
							</el-form-item>
						</div>

					</el-form>
				</el-row>
			</div>
			<div class="batchDel">
				<div class="delBtn" @click="deleteTableData">删除</div>
			</div>
			<el-table :data="Model.tableData" border max-height="550" :row-style="selectedHighlight" @selection-change="handleSelectionChange">
				<el-table-column type="selection" width="50" fixed></el-table-column>
				<el-table-column label="订单单号" width="160">
					<template slot-scope="scope">
						<el-button type="text" @click="toDetial(scope.row)"><a class="detial-link">{{scope.row.saleNumber}}</a></el-button>
					</template>
				</el-table-column>
				<el-table-column v-for="(item,index) in Model.tableHeaderData" :key="item.prop" :prop="item.prop" :label="item.label">
				</el-table-column>
			</el-table>

			<el-row class="bottom">
				<div class="btn_group">
					<div class="btn_item" @click="onConfirmNew">保存</div>
					<div class="btn_item cancel" @click="cancelOrder">取消</div>
				</div>
			</el-row>
		</div>



	</div>
</template>

<script>
	import pathTracking from '@/components/common/pathTracking'
	import card from '@/components/common/filterBtns'
	import advancedSearch from "@/components/common/filter/advancedSearch";

	import {
		getDateString
	} from "@/assets/js/common.js"
	import Model from './model.js'
	import Controller from './controller.js'
	export default {
		name: "newPage",
		mixins: [Model, Controller],
		components: {
			pathTracking,
			card,
			advancedSearch
		},
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
	@import "./index.less";
</style>
<style>
	.sportnew .items .el-input__inner {
		height: 100%;
	}

	.sportnew .el-input {
		height: 100%;
	}

	.sportnew .el-date-editor {
		height: 100%;
		;
	}

	.payitem .el-input {
		width: 240px;
	}

	.sportnew .el-cascader {
		width: 100%;
		height: 32px;
	}

	.sportnew .changeGoodsDialog .el-dialog {
		height: 80%;
	}

	.sportnew .confirm-dialo .el-dialog {}
</style>
